package org.example;

// 词法单元
public class Token {

    public int type;
    public String text;

    public Token(int type, String text) {
        this.type = type;
        this.text = text;
    }

    @Override
    public String toString() {
        String typeName = ListLexer.getTokenName(type);
        return "<'" + text + "'," + typeName + ">";
    }
}
